import request from '@/utils/request'

export function getAllRoleApi (data) {
  return request({
    url: `/sys/role`,
    method: 'get',
    params: data
  })
}

export function editRoleApi (data) {
  return request({
    url: `/sys/role/${data.id}`,
    method: 'put',
    data
  })
}

export function addRoleApi (data) {
  return request({
    url: `/sys/role`,
    method: 'post',
    data: data
  })
}

export function deleteRoleApi (id) {
  return request({
    url: `/sys/role/${id}`,
    method: 'delete'
  })
}

export function getCompanyApi (id) {
  return request({
    url: `/company/${id}`,
    method: 'get'
  })
}
